On the Floyd-Warshall Algorithm for Logic Programs

نویسندگان

  • Christos H. Papadimitriou
  • Martha Sideri
چکیده

We explore the possibility of evaluating single-rule Datalog programs eeciently and with logarithmic work space by a natural extension of the Floyd-Warshall algorithm for transitive closure. We characterize exactly the single rule chain programs that can be so evaluated: they are rather modest generalizations of the transitive closure. The proof relies on an interesting language-theoretic concept, total ambiguity. Extensions to more general classes of programs, and more general algorithms, are discussed.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Floyd-Warshall algorithm on graphs with negative cycles

The Floyd-Warshall algorithm is a simple and widely used algorithm to compute shortest paths between all pairs of vertices in an edge weighted directed graph. It can also be used to detect the presence of negative cycles. We will show that for this task many existing implementations of the Floyd-Warshall algorithm will fail because exponentially large numbers can appear during its execution.

متن کامل

From Proofs to Programs in the Minlog System the Warshall Algorithm and Higman's Lemma

The Warshall algorithm computing the transitive closure of a relation is extracted from a constructive proof that repetitions in a path can always be avoided. Secondly a nonconstructive proof of a special case of Higman's lemma is transformed into a constructive proof. From the latter an eecient program is extracted. Both examples are implemented in the interactive theorem prover Minlog develop...

متن کامل

Transitive closure according to Roy-Floyd-Warshall

This formulation of the Roy-Floyd-Warshall algorithm for the transitive closure bypasses matrices and arrays, but uses a more direct mathematical model with adjacency functions for immediate predecessors and successors. This can be implemented efficiently in functional programming languages and is particularly adequate for sparse relations.

متن کامل

Cluster Formation and Cluster Head Selection approach for Vehicle Ad-Hoc Network (VANETs) using K-Means and Floyd-Warshall Technique

Vehicular Ad-hoc Network (VANETs) is the specific form of Mobile ad-hoc networking (MANETs) in which high dynamic nodes are utilized in carrying out the operations. They are mainly used in urban areas for safety traveling. Clustering algorithms are used for clustering the vehicles that are in the range of the network as VANET consists of a great amount of traffic. A clustering head node is used...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. Log. Program.

دوره 41  شماره 

صفحات  -

تاریخ انتشار 1999